Integrand size = 17, antiderivative size = 80 \[ \int \left (a+b \cot ^2(x)\right )^{3/2} \tan ^2(x) \, dx=(a-b)^{3/2} \arctan \left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )-b^{3/2} \text {arctanh}\left (\frac {\sqrt {b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )+a \sqrt {a+b \cot ^2(x)} \tan (x) \]
(a-b)^(3/2)*arctan(cot(x)*(a-b)^(1/2)/(a+b*cot(x)^2)^(1/2))-b^(3/2)*arctan h(cot(x)*b^(1/2)/(a+b*cot(x)^2)^(1/2))+a*(a+b*cot(x)^2)^(1/2)*tan(x)
Leaf count is larger than twice the leaf count of optimal. \(222\) vs. \(2(80)=160\).
Time = 0.82 (sec) , antiderivative size = 222, normalized size of antiderivative = 2.78 \[ \int \left (a+b \cot ^2(x)\right )^{3/2} \tan ^2(x) \, dx=\frac {\sqrt {-\left ((-a-b+(a-b) \cos (2 x)) \csc ^2(x)\right )} \left (-\sqrt {2} (a-b)^2 \sqrt {-b} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a-b} \cos (x)}{\sqrt {-a-b+(a-b) \cos (2 x)}}\right )+\sqrt {a-b} \left (\sqrt {2} b^2 \text {arctanh}\left (\frac {\sqrt {2} \sqrt {-b} \cos (x)}{\sqrt {-a-b+(a-b) \cos (2 x)}}\right )+a \sqrt {-b} \sqrt {-a-b+(a-b) \cos (2 x)} \sec (x)\right )\right ) \sin (x)}{\sqrt {2} \sqrt {a-b} \sqrt {-b} \sqrt {-a-b+(a-b) \cos (2 x)}} \]
(Sqrt[-((-a - b + (a - b)*Cos[2*x])*Csc[x]^2)]*(-(Sqrt[2]*(a - b)^2*Sqrt[- b]*ArcTanh[(Sqrt[2]*Sqrt[a - b]*Cos[x])/Sqrt[-a - b + (a - b)*Cos[2*x]]]) + Sqrt[a - b]*(Sqrt[2]*b^2*ArcTanh[(Sqrt[2]*Sqrt[-b]*Cos[x])/Sqrt[-a - b + (a - b)*Cos[2*x]]] + a*Sqrt[-b]*Sqrt[-a - b + (a - b)*Cos[2*x]]*Sec[x]))* Sin[x])/(Sqrt[2]*Sqrt[a - b]*Sqrt[-b]*Sqrt[-a - b + (a - b)*Cos[2*x]])
Time = 0.31 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.529, Rules used = {3042, 4153, 376, 25, 398, 224, 219, 291, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^2(x) \left (a+b \cot ^2(x)\right )^{3/2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \tan \left (x+\frac {\pi }{2}\right )^2\right )^{3/2}}{\tan \left (x+\frac {\pi }{2}\right )^2}dx\) |
\(\Big \downarrow \) 4153 |
\(\displaystyle -\int \frac {\left (b \cot ^2(x)+a\right )^{3/2} \tan ^2(x)}{\cot ^2(x)+1}d\cot (x)\) |
\(\Big \downarrow \) 376 |
\(\displaystyle a \tan (x) \sqrt {a+b \cot ^2(x)}-\int -\frac {a (a-2 b)-b^2 \cot ^2(x)}{\left (\cot ^2(x)+1\right ) \sqrt {b \cot ^2(x)+a}}d\cot (x)\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int \frac {a (a-2 b)-b^2 \cot ^2(x)}{\left (\cot ^2(x)+1\right ) \sqrt {b \cot ^2(x)+a}}d\cot (x)+a \tan (x) \sqrt {a+b \cot ^2(x)}\) |
\(\Big \downarrow \) 398 |
\(\displaystyle -b^2 \int \frac {1}{\sqrt {b \cot ^2(x)+a}}d\cot (x)+(a-b)^2 \int \frac {1}{\left (\cot ^2(x)+1\right ) \sqrt {b \cot ^2(x)+a}}d\cot (x)+a \tan (x) \sqrt {a+b \cot ^2(x)}\) |
\(\Big \downarrow \) 224 |
\(\displaystyle -b^2 \int \frac {1}{1-\frac {b \cot ^2(x)}{b \cot ^2(x)+a}}d\frac {\cot (x)}{\sqrt {b \cot ^2(x)+a}}+(a-b)^2 \int \frac {1}{\left (\cot ^2(x)+1\right ) \sqrt {b \cot ^2(x)+a}}d\cot (x)+a \tan (x) \sqrt {a+b \cot ^2(x)}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle (a-b)^2 \int \frac {1}{\left (\cot ^2(x)+1\right ) \sqrt {b \cot ^2(x)+a}}d\cot (x)-b^{3/2} \text {arctanh}\left (\frac {\sqrt {b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )+a \tan (x) \sqrt {a+b \cot ^2(x)}\) |
\(\Big \downarrow \) 291 |
\(\displaystyle (a-b)^2 \int \frac {1}{1-\frac {(b-a) \cot ^2(x)}{b \cot ^2(x)+a}}d\frac {\cot (x)}{\sqrt {b \cot ^2(x)+a}}-b^{3/2} \text {arctanh}\left (\frac {\sqrt {b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )+a \tan (x) \sqrt {a+b \cot ^2(x)}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle (a-b)^{3/2} \arctan \left (\frac {\sqrt {a-b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )-b^{3/2} \text {arctanh}\left (\frac {\sqrt {b} \cot (x)}{\sqrt {a+b \cot ^2(x)}}\right )+a \tan (x) \sqrt {a+b \cot ^2(x)}\) |
(a - b)^(3/2)*ArcTan[(Sqrt[a - b]*Cot[x])/Sqrt[a + b*Cot[x]^2]] - b^(3/2)* ArcTanh[(Sqrt[b]*Cot[x])/Sqrt[a + b*Cot[x]^2]] + a*Sqrt[a + b*Cot[x]^2]*Ta n[x]
3.1.30.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] && !GtQ[a, 0]
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*((c_) + (d_.)*(x_)^2)), x_Symbol] :> Subst [Int[1/(c - (b*c - a*d)*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]
Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_) , x_Symbol] :> Simp[c*(e*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q - 1 )/(a*e*(m + 1))), x] - Simp[1/(a*e^2*(m + 1)) Int[(e*x)^(m + 2)*(a + b*x^ 2)^p*(c + d*x^2)^(q - 2)*Simp[c*(b*c - a*d)*(m + 1) + 2*c*(b*c*(p + 1) + a* d*(q - 1)) + d*((b*c - a*d)*(m + 1) + 2*b*c*(p + q))*x^2, x], x], x] /; Fre eQ[{a, b, c, d, e, p}, x] && NeQ[b*c - a*d, 0] && GtQ[q, 1] && LtQ[m, -1] & & IntBinomialQ[a, b, c, d, e, m, 2, p, q, x]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*Sqrt[(c_) + (d_.)*(x_)^2]) , x_Symbol] :> Simp[f/b Int[1/Sqrt[c + d*x^2], x], x] + Simp[(b*e - a*f)/ b Int[1/((a + b*x^2)*Sqrt[c + d*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f} , x]
Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[c*(ff/f) Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2 + f f^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ[n, 2] || EqQ[n, 4] || (IntegerQ[p] && Ratio nalQ[n]))
Leaf count of result is larger than twice the leaf count of optimal. \(641\) vs. \(2(66)=132\).
Time = 0.82 (sec) , antiderivative size = 642, normalized size of antiderivative = 8.02
method | result | size |
default | \(\frac {\sqrt {4}\, \left (2 \cos \left (x \right ) b^{\frac {7}{2}} \ln \left (4 \cos \left (x \right ) \sqrt {-a +b}\, \sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}-4 \cos \left (x \right ) a +4 b \cos \left (x \right )+4 \sqrt {-a +b}\, \sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}\right )-4 \cos \left (x \right ) b^{\frac {5}{2}} \ln \left (4 \cos \left (x \right ) \sqrt {-a +b}\, \sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}-4 \cos \left (x \right ) a +4 b \cos \left (x \right )+4 \sqrt {-a +b}\, \sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}\right ) a +2 \cos \left (x \right ) b^{\frac {3}{2}} \sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}\, \sqrt {-a +b}\, a +2 \cos \left (x \right ) b^{\frac {3}{2}} \ln \left (4 \cos \left (x \right ) \sqrt {-a +b}\, \sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}-4 \cos \left (x \right ) a +4 b \cos \left (x \right )+4 \sqrt {-a +b}\, \sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}\right ) a^{2}+2 b^{\frac {3}{2}} \sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}\, \sqrt {-a +b}\, a -\cos \left (x \right ) \ln \left (-\frac {4 \left (\sqrt {b}\, \sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}\, \cos \left (x \right )-\cos \left (x \right ) a +b \cos \left (x \right )+\sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}\, \sqrt {b}+a \right )}{\cos \left (x \right )-1}\right ) \sqrt {-a +b}\, b^{3}+\cos \left (x \right ) \ln \left (\frac {2 \sqrt {b}\, \sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}\, \cos \left (x \right )+2 \cos \left (x \right ) a -2 b \cos \left (x \right )+2 \sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}\, \sqrt {b}+2 a}{\sqrt {b}\, \left (\cos \left (x \right )+1\right )}\right ) \sqrt {-a +b}\, b^{3}\right ) \left (\cos \left (x \right )-1\right ) \left (a +b \cot \left (x \right )^{2}\right )^{\frac {3}{2}} \tan \left (x \right )}{4 b^{\frac {3}{2}} \sqrt {-a +b}\, \left (a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a \right ) \sqrt {-\frac {a \cos \left (x \right )^{2}-\cos \left (x \right )^{2} b -a}{\left (\cos \left (x \right )+1\right )^{2}}}}\) | \(642\) |
1/4*4^(1/2)/b^(3/2)/(-a+b)^(1/2)*(2*cos(x)*b^(7/2)*ln(4*cos(x)*(-a+b)^(1/2 )*(-(a*cos(x)^2-cos(x)^2*b-a)/(cos(x)+1)^2)^(1/2)-4*cos(x)*a+4*b*cos(x)+4* (-a+b)^(1/2)*(-(a*cos(x)^2-cos(x)^2*b-a)/(cos(x)+1)^2)^(1/2))-4*cos(x)*b^( 5/2)*ln(4*cos(x)*(-a+b)^(1/2)*(-(a*cos(x)^2-cos(x)^2*b-a)/(cos(x)+1)^2)^(1 /2)-4*cos(x)*a+4*b*cos(x)+4*(-a+b)^(1/2)*(-(a*cos(x)^2-cos(x)^2*b-a)/(cos( x)+1)^2)^(1/2))*a+2*cos(x)*b^(3/2)*(-(a*cos(x)^2-cos(x)^2*b-a)/(cos(x)+1)^ 2)^(1/2)*(-a+b)^(1/2)*a+2*cos(x)*b^(3/2)*ln(4*cos(x)*(-a+b)^(1/2)*(-(a*cos (x)^2-cos(x)^2*b-a)/(cos(x)+1)^2)^(1/2)-4*cos(x)*a+4*b*cos(x)+4*(-a+b)^(1/ 2)*(-(a*cos(x)^2-cos(x)^2*b-a)/(cos(x)+1)^2)^(1/2))*a^2+2*b^(3/2)*(-(a*cos (x)^2-cos(x)^2*b-a)/(cos(x)+1)^2)^(1/2)*(-a+b)^(1/2)*a-cos(x)*ln(-4*(b^(1/ 2)*(-(a*cos(x)^2-cos(x)^2*b-a)/(cos(x)+1)^2)^(1/2)*cos(x)-cos(x)*a+b*cos(x )+(-(a*cos(x)^2-cos(x)^2*b-a)/(cos(x)+1)^2)^(1/2)*b^(1/2)+a)/(cos(x)-1))*( -a+b)^(1/2)*b^3+cos(x)*ln(2/b^(1/2)*(b^(1/2)*(-(a*cos(x)^2-cos(x)^2*b-a)/( cos(x)+1)^2)^(1/2)*cos(x)+(-(a*cos(x)^2-cos(x)^2*b-a)/(cos(x)+1)^2)^(1/2)* b^(1/2)+cos(x)*a-b*cos(x)+a)/(cos(x)+1))*(-a+b)^(1/2)*b^3)*(cos(x)-1)*(a+b *cot(x)^2)^(3/2)/(a*cos(x)^2-cos(x)^2*b-a)/(-(a*cos(x)^2-cos(x)^2*b-a)/(co s(x)+1)^2)^(1/2)*tan(x)
Time = 0.76 (sec) , antiderivative size = 543, normalized size of antiderivative = 6.79 \[ \int \left (a+b \cot ^2(x)\right )^{3/2} \tan ^2(x) \, dx=\left [\frac {1}{4} \, {\left (-a + b\right )}^{\frac {3}{2}} \log \left (-\frac {a^{2} \tan \left (x\right )^{4} - 2 \, {\left (3 \, a^{2} - 4 \, a b\right )} \tan \left (x\right )^{2} + a^{2} - 8 \, a b + 8 \, b^{2} + 4 \, {\left (a \tan \left (x\right )^{3} - {\left (a - 2 \, b\right )} \tan \left (x\right )\right )} \sqrt {-a + b} \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}}}{\tan \left (x\right )^{4} + 2 \, \tan \left (x\right )^{2} + 1}\right ) + \frac {1}{2} \, b^{\frac {3}{2}} \log \left (\frac {a \tan \left (x\right )^{2} - 2 \, \sqrt {b} \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}} \tan \left (x\right ) + 2 \, b}{\tan \left (x\right )^{2}}\right ) + a \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}} \tan \left (x\right ), \sqrt {-b} b \arctan \left (\frac {\sqrt {-b} \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}} \tan \left (x\right )}{b}\right ) + \frac {1}{4} \, {\left (-a + b\right )}^{\frac {3}{2}} \log \left (-\frac {a^{2} \tan \left (x\right )^{4} - 2 \, {\left (3 \, a^{2} - 4 \, a b\right )} \tan \left (x\right )^{2} + a^{2} - 8 \, a b + 8 \, b^{2} + 4 \, {\left (a \tan \left (x\right )^{3} - {\left (a - 2 \, b\right )} \tan \left (x\right )\right )} \sqrt {-a + b} \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}}}{\tan \left (x\right )^{4} + 2 \, \tan \left (x\right )^{2} + 1}\right ) + a \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}} \tan \left (x\right ), \frac {1}{2} \, {\left (a - b\right )}^{\frac {3}{2}} \arctan \left (\frac {2 \, \sqrt {a - b} \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}} \tan \left (x\right )}{a \tan \left (x\right )^{2} - a + 2 \, b}\right ) + \frac {1}{2} \, b^{\frac {3}{2}} \log \left (\frac {a \tan \left (x\right )^{2} - 2 \, \sqrt {b} \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}} \tan \left (x\right ) + 2 \, b}{\tan \left (x\right )^{2}}\right ) + a \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}} \tan \left (x\right ), \frac {1}{2} \, {\left (a - b\right )}^{\frac {3}{2}} \arctan \left (\frac {2 \, \sqrt {a - b} \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}} \tan \left (x\right )}{a \tan \left (x\right )^{2} - a + 2 \, b}\right ) + \sqrt {-b} b \arctan \left (\frac {\sqrt {-b} \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}} \tan \left (x\right )}{b}\right ) + a \sqrt {\frac {a \tan \left (x\right )^{2} + b}{\tan \left (x\right )^{2}}} \tan \left (x\right )\right ] \]
[1/4*(-a + b)^(3/2)*log(-(a^2*tan(x)^4 - 2*(3*a^2 - 4*a*b)*tan(x)^2 + a^2 - 8*a*b + 8*b^2 + 4*(a*tan(x)^3 - (a - 2*b)*tan(x))*sqrt(-a + b)*sqrt((a*t an(x)^2 + b)/tan(x)^2))/(tan(x)^4 + 2*tan(x)^2 + 1)) + 1/2*b^(3/2)*log((a* tan(x)^2 - 2*sqrt(b)*sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x) + 2*b)/tan(x)^ 2) + a*sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x), sqrt(-b)*b*arctan(sqrt(-b)* sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x)/b) + 1/4*(-a + b)^(3/2)*log(-(a^2*t an(x)^4 - 2*(3*a^2 - 4*a*b)*tan(x)^2 + a^2 - 8*a*b + 8*b^2 + 4*(a*tan(x)^3 - (a - 2*b)*tan(x))*sqrt(-a + b)*sqrt((a*tan(x)^2 + b)/tan(x)^2))/(tan(x) ^4 + 2*tan(x)^2 + 1)) + a*sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x), 1/2*(a - b)^(3/2)*arctan(2*sqrt(a - b)*sqrt((a*tan(x)^2 + b)/tan(x)^2)*tan(x)/(a*t an(x)^2 - a + 2*b)) + 1/2*b^(3/2)*log((a*tan(x)^2 - 2*sqrt(b)*sqrt((a*tan( x)^2 + b)/tan(x)^2)*tan(x) + 2*b)/tan(x)^2) + a*sqrt((a*tan(x)^2 + b)/tan( x)^2)*tan(x), 1/2*(a - b)^(3/2)*arctan(2*sqrt(a - b)*sqrt((a*tan(x)^2 + b) /tan(x)^2)*tan(x)/(a*tan(x)^2 - a + 2*b)) + sqrt(-b)*b*arctan(sqrt(-b)*sqr t((a*tan(x)^2 + b)/tan(x)^2)*tan(x)/b) + a*sqrt((a*tan(x)^2 + b)/tan(x)^2) *tan(x)]
\[ \int \left (a+b \cot ^2(x)\right )^{3/2} \tan ^2(x) \, dx=\int \left (a + b \cot ^{2}{\left (x \right )}\right )^{\frac {3}{2}} \tan ^{2}{\left (x \right )}\, dx \]
\[ \int \left (a+b \cot ^2(x)\right )^{3/2} \tan ^2(x) \, dx=\int { {\left (b \cot \left (x\right )^{2} + a\right )}^{\frac {3}{2}} \tan \left (x\right )^{2} \,d x } \]
Leaf count of result is larger than twice the leaf count of optimal. 625 vs. \(2 (66) = 132\).
Time = 18.70 (sec) , antiderivative size = 625, normalized size of antiderivative = 7.81 \[ \int \left (a+b \cot ^2(x)\right )^{3/2} \tan ^2(x) \, dx=-\frac {1}{2} \, {\left (\frac {2 \, \sqrt {-a + b} b^{2} \arctan \left (\frac {{\left (\sqrt {-a + b} \cos \left (x\right ) - \sqrt {-a \cos \left (x\right )^{2} + b \cos \left (x\right )^{2} + a}\right )}^{2} + a - 2 \, b}{2 \, \sqrt {a b - b^{2}}}\right )}{\sqrt {a b - b^{2}}} - {\left (a - b\right )} \sqrt {-a + b} \log \left ({\left (\sqrt {-a + b} \cos \left (x\right ) - \sqrt {-a \cos \left (x\right )^{2} + b \cos \left (x\right )^{2} + a}\right )}^{2}\right ) + \frac {4 \, a^{2} \sqrt {-a + b}}{{\left (\sqrt {-a + b} \cos \left (x\right ) - \sqrt {-a \cos \left (x\right )^{2} + b \cos \left (x\right )^{2} + a}\right )}^{2} - a}\right )} \mathrm {sgn}\left (\sin \left (x\right )\right ) - \frac {{\left (2 \, a \sqrt {-a + b} b^{2} \arctan \left (\frac {\sqrt {-a + b} \sqrt {b}}{\sqrt {a b - b^{2}}}\right ) - 2 \, a b^{\frac {5}{2}} \arctan \left (\frac {\sqrt {-a + b} \sqrt {b}}{\sqrt {a b - b^{2}}}\right ) - 2 \, \sqrt {-a + b} b^{3} \arctan \left (\frac {\sqrt {-a + b} \sqrt {b}}{\sqrt {a b - b^{2}}}\right ) + 2 \, b^{\frac {7}{2}} \arctan \left (\frac {\sqrt {-a + b} \sqrt {b}}{\sqrt {a b - b^{2}}}\right ) + \sqrt {a b - b^{2}} a^{2} \sqrt {-a + b} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) - \sqrt {a b - b^{2}} a^{2} \sqrt {b} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) - 2 \, \sqrt {a b - b^{2}} a \sqrt {-a + b} b \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + 2 \, \sqrt {a b - b^{2}} a b^{\frac {3}{2}} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + \sqrt {a b - b^{2}} \sqrt {-a + b} b^{2} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) - \sqrt {a b - b^{2}} b^{\frac {5}{2}} \log \left (-a - 2 \, \sqrt {-a + b} \sqrt {b} + 2 \, b\right ) + 2 \, \sqrt {a b - b^{2}} a^{2} \sqrt {-a + b}\right )} \mathrm {sgn}\left (\sin \left (x\right )\right )}{2 \, {\left (\sqrt {a b - b^{2}} a + \sqrt {a b - b^{2}} \sqrt {-a + b} \sqrt {b} - \sqrt {a b - b^{2}} b\right )}} \]
-1/2*(2*sqrt(-a + b)*b^2*arctan(1/2*((sqrt(-a + b)*cos(x) - sqrt(-a*cos(x) ^2 + b*cos(x)^2 + a))^2 + a - 2*b)/sqrt(a*b - b^2))/sqrt(a*b - b^2) - (a - b)*sqrt(-a + b)*log((sqrt(-a + b)*cos(x) - sqrt(-a*cos(x)^2 + b*cos(x)^2 + a))^2) + 4*a^2*sqrt(-a + b)/((sqrt(-a + b)*cos(x) - sqrt(-a*cos(x)^2 + b *cos(x)^2 + a))^2 - a))*sgn(sin(x)) - 1/2*(2*a*sqrt(-a + b)*b^2*arctan(sqr t(-a + b)*sqrt(b)/sqrt(a*b - b^2)) - 2*a*b^(5/2)*arctan(sqrt(-a + b)*sqrt( b)/sqrt(a*b - b^2)) - 2*sqrt(-a + b)*b^3*arctan(sqrt(-a + b)*sqrt(b)/sqrt( a*b - b^2)) + 2*b^(7/2)*arctan(sqrt(-a + b)*sqrt(b)/sqrt(a*b - b^2)) + sqr t(a*b - b^2)*a^2*sqrt(-a + b)*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) - sqr t(a*b - b^2)*a^2*sqrt(b)*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) - 2*sqrt(a *b - b^2)*a*sqrt(-a + b)*b*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) + 2*sqrt (a*b - b^2)*a*b^(3/2)*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) + sqrt(a*b - b^2)*sqrt(-a + b)*b^2*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) - sqrt(a*b - b^2)*b^(5/2)*log(-a - 2*sqrt(-a + b)*sqrt(b) + 2*b) + 2*sqrt(a*b - b^2)*a^ 2*sqrt(-a + b))*sgn(sin(x))/(sqrt(a*b - b^2)*a + sqrt(a*b - b^2)*sqrt(-a + b)*sqrt(b) - sqrt(a*b - b^2)*b)
Timed out. \[ \int \left (a+b \cot ^2(x)\right )^{3/2} \tan ^2(x) \, dx=\int {\mathrm {tan}\left (x\right )}^2\,{\left (b\,{\mathrm {cot}\left (x\right )}^2+a\right )}^{3/2} \,d x \]